package o;

import com.huawei.hms.support.api.entity.pay.HwPayConstant;
import java.util.Map;
import java.util.Map.Entry;

public class fct {
    public static boolean ˎ(String str, fcu o_fcu) {
        String str2;
        String ˎ = ˎ(avz.ॱ(str), o_fcu);
        Object ˋ = avz.ˋ(str);
        if (ˋ != null) {
            str2 = (String) ˋ;
        } else {
            str2 = null;
        }
        o_fcu.ʼ(str2);
        if ("fail".equals(ˎ) || "key_error".equals(ˎ) || "value_error".equals(ˎ)) {
            return false;
        }
        if ("update".equals(ˎ)) {
            return true;
        }
        return true;
    }

    private static String ˎ(Map map, fcu o_fcu) {
        if (map == null) {
            return "fail";
        }
        String str = "success";
        for (Entry entry : map.entrySet()) {
            String str2;
            Object key = entry.getKey();
            Object value = entry.getValue();
            if (key == null) {
                str2 = "key_error";
            } else if (key instanceof String) {
                str2 = (String) key;
                boolean z = value == null;
                if (!fcq.ˏ(str2)) {
                    Logger.ˎ("InitParamsSupport", "unknown name");
                    str2 = "update";
                } else if ((value instanceof String) || z) {
                    ˏ(o_fcu, value, str2, z);
                    str2 = str;
                } else if (value instanceof Integer) {
                    int intValue = ((Integer) value).intValue();
                    if (str2.equals(HwPayConstant.KEY_SDKCHANNEL)) {
                        o_fcu.ˏ(intValue);
                    }
                    str2 = str;
                } else {
                    Logger.e("InitParamsSupport", "Invalid value");
                    str2 = "value_error";
                }
            } else {
                Logger.e("InitParamsSupport", "Invalid key");
                str2 = "key_error";
            }
            str = str2;
        }
        return str;
    }

    private static void ˏ(fcu o_fcu, Object obj, String str, boolean z) {
        String str2;
        if (z) {
            str2 = null;
        } else {
            str2 = (String) obj;
        }
        Object obj2 = -1;
        switch (str.hashCode()) {
            case -1492111328:
                if (str.equals(HwPayConstant.KEY_PRODUCTDESC)) {
                    obj2 = 5;
                    break;
                }
                break;
            case -1491817446:
                if (str.equals(HwPayConstant.KEY_PRODUCTNAME)) {
                    obj2 = 4;
                    break;
                }
                break;
            case -1413853096:
                if (str.equals(HwPayConstant.KEY_AMOUNT)) {
                    obj2 = 3;
                    break;
                }
                break;
            case -1011352981:
                if (str.equals(HwPayConstant.KEY_APPLICATIONID)) {
                    obj2 = 2;
                    break;
                }
                break;
            case -836030938:
                if (str.equals("userID")) {
                    obj2 = 1;
                    break;
                }
                break;
            case -266666762:
                if (str.equals(HwPayConstant.KEY_USER_NAME)) {
                    obj2 = null;
                    break;
                }
                break;
            case 3530173:
                if (str.equals(HwPayConstant.KEY_SIGN)) {
                    obj2 = 7;
                    break;
                }
                break;
            case 693933066:
                if (str.equals(HwPayConstant.KEY_REQUESTID)) {
                    obj2 = 6;
                    break;
                }
                break;
        }
        switch (obj2) {
            case null:
                o_fcu.ˎ(str2);
                return;
            case 1:
                o_fcu.ˊ(str2);
                return;
            case 2:
                o_fcu.ˏ(str2);
                return;
            case 3:
                o_fcu.ॱ(str2);
                return;
            case 4:
                o_fcu.ʽ(str2);
                return;
            case 5:
                o_fcu.ˋ(str2);
                return;
            case 6:
                o_fcu.ᐝ(str2);
                return;
            case 7:
                o_fcu.ʻ(str2);
                return;
            default:
                ॱ(o_fcu, str, str2);
                return;
        }
    }

    private static void ॱ(fcu o_fcu, String str, String str2) {
        Object obj = -1;
        switch (str.hashCode()) {
            case -1482806364:
                if (str.equals(HwPayConstant.KEY_SERVICECATALOG)) {
                    obj = 1;
                    break;
                }
                break;
            case -836741164:
                if (str.equals(HwPayConstant.KEY_URLVER)) {
                    obj = 2;
                    break;
                }
                break;
            case 311343767:
                if (str.equals(HwPayConstant.KEY_SIGN_TYPE)) {
                    obj = 4;
                    break;
                }
                break;
            case 1587660905:
                if (str.equals(HwPayConstant.KEY_EXTRESERVED)) {
                    obj = 3;
                    break;
                }
                break;
            case 1902085478:
                if (str.equals(HwPayConstant.KEY_NOTIFY_URL)) {
                    obj = null;
                    break;
                }
                break;
        }
        switch (obj) {
            case null:
                o_fcu.ॱॱ(str2);
                return;
            case 1:
                o_fcu.ͺ(str2);
                return;
            case 2:
                o_fcu.ˊॱ(str2);
                return;
            case 3:
                o_fcu.ॱˊ(str2);
                return;
            case 4:
                o_fcu.ˏॱ(str2);
                return;
            default:
                return;
        }
    }
}
